package com.huaqin.develop.demotest.controller;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 监听rocketmq主题的消息
 *
 * @author 懂java的测试
 * @date 2022/8/14 19:29
 */
@Component
@RocketMQMessageListener(consumerGroup = "fourbrotherConsumer", topic = "fourbrothertopic")
@Slf4j
public class FourbrothertopicListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.info("------- FourbrothertopicListener 处理消息: {}", message);
    }

}
